package com.sinodata.bsm.center.engine.event;

import java.util.List;

import com.sinodata.bsm.common.vo.Event;

/**
 * 
 * <p>
 * Description: 事件处理工作链
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-5-24 AM 10:55:59    liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see
 */
public class EventWorkChain implements Runnable {

    private final List<EventWorker> taches;

    private final Event event;

    /**
     * 事件处理工作链
     */
    public EventWorkChain(List<EventWorker> taches, Event event) {
        this.taches = taches;
        this.event = event;
    }

    @Override
    public void run() {
        for (int i = 0; i < taches.size(); i++) {
            taches.get(i).execute(event);
        }
    }

}